<?php

include 'gifts_db.php';

$url = 'http://www.amberizon.com/jewelry/multicolred_amber_925_sterling_silver_pin_1377_48.html;jsessionid=BD446E01CB446F9632020A8916D086C3';

$text = file_get_contents('contents.txt');
if ($text == '')
{
    $text = file_get_contents($url);
    file_put_contents('contents.txt', $text);
}

$title = getTitle($text);
echo 'len:'.strlen($text)."\n";
echo $title."\n";
$picture = getPicture($url, $text, explode(' ', $title));
echo $picture."\n";

?>

